<template>
    <div>
        <!-- 卡片视图 -->
        <el-card>
            <el-col :span="4">
                <el-button type="primary" @click="addDialogVisible = true">添加班级</el-button>
            </el-col>
            <el-table :data="classesList" border stripe>
                <el-table-column type="index"></el-table-column>
                <el-table-column label="班级名称" prop="classesName"></el-table-column>
                <el-table-column label="代班老师" prop="classesTeacher"></el-table-column>
                <el-table-column label="操作">
                    <template v-slot="scope">
                        <!-- 修改按钮 -->
                        <el-button type="primary" v-model="scope.row.Id">
                            <el-icon>
                                <edit />
                            </el-icon>
                        </el-button>
                        <!-- 删除按钮 -->
                        <el-button type="danger"><el-icon>
                                <delete />
                            </el-icon></el-button>
                    </template>
                </el-table-column>
            </el-table>
        </el-card>
    </div>
  </template>
  
  <script>
  
  export default {
    data() {
        return {
            //班级列表
            classesList: [
                {
                    id: 1,
                    classesName: "软件开发1班",
                    classesTeacher: '阙振东',
                },
                {
                    id: 2,
                    classesName: "实施1班",
                    classesTeacher: '胡富文',
                },
                {
                    id: 2,
                    classesName: "新媒体1班",
                    classesTeacher: '刘胡',
                },
                
                
            ]
        }
    },
    created() {
        //获取所有
        this.getclassesList()
    },
    methods: {
        //获取班级列表
        getclassesList() {
            console.log('获取班级列表');
        }
    }
  }
  </script>